﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AppFx.ComponentModel.Attributes
{
	/// <summary>
	/// Attribute used to describe the "displayunit" of a value - 10.000 could then be 10.000 €
	/// </summary>
	[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
	public class UnitAttribute : Attribute
	{
		/// <summary>
		/// The Unit that describes some associated value. (10.000 -> 10.000 €)
		/// </summary>
		public string Unit { get; protected set; }

		/// <summary>
		/// Creates a new instance of the UnitAttribute and sets the Unit-Property.
		/// </summary>
		/// <param name="unit"></param>
		public UnitAttribute(string unit)
		{
			Unit = unit;
		}
	}
}
